package top.shaozuo.simple.user.web.listener;

import java.util.logging.Logger;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import top.shaozuo.simple.context.ComponentContext;

public class ComponentContextListener implements ServletContextListener {

    private static final Logger logger = Logger.getLogger(ComponentContextListener.class.getName());

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        logger.info("ServletContextEvent occur");
        ComponentContext context = new ComponentContext();
        context.init(sce.getServletContext());
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        logger.info("ServletContextEvent occur");
    }

}
